/* 1408. 数组中的字符串匹配 */
/**
 * @param {string[]} words
 * @return {string[]}
 */
var stringMatching = function (words) {
	const ret = []
	for (let i = 0; i < words.length; i++) {
		for (let j = 0; j < words.length; j++) {
			if (i !== j && words[j].indexOf(words[i]) !== -1) {
				ret.push(words[i])
				break
			}
		}
	}
	return ret
}
stringMatching(['leetcode', 'et', 'code'])
